<template>
  <transition name="slide">
    <div class="list" min-height="540px">
      <van-nav-bar title="成绩查询" leftText="返回" rightText="1" leftArrow @click-left="onClickLeft" @click-right="onClickRight" />
      <!-- <div class="scroll-wrapper" :ref="scroll-wrapper">
        <cube-scroll ref="scroll" :data="items" :options="options" @pulling-up="onPullingUp" @pulling-down="onPullingDown"></cube-scroll>
      </div> -->
      <router-view></router-view>
    </div>
  </transition>
</template>
<script>
import Vue from "vue";
import { Loading } from "vant";

Vue.use(Loading);

export default{
  data (){
    return {

    }
  },
  methods:{
    onClickLeft() {
      this.$router.go(-1);
      this.$router.beforeEach((to, from, next) => {
        const toDepth = to.path.split('/').length
        const fromDepth = from.path.split('/').length
        if (toDepth < fromDepth) {
          console.log('后退。。。')
          from.meta.keepAlive = false
          to.meta.keepAlive = true
        }
        next()
      })
    },
    onClickRight() {
      this.$router.push("/login/mint-pull");
    }
  }
}
</script>

<style lang="less" scoped>
@import "../../assets/less/baseDetail.less";
</style>
